Holds all information required for an image, with no ownership over the data. More...
Public Member Functions | |
ImageView ()=delete | |
ImageView (const Image &image) | |
ImageView (const nkMemory::BufferView< unsigned char > &dataView) | |
ImageView (const nkMemory::BufferView< unsigned char > dataView, unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize=0, unsigned int rowByteSize=0, unsigned int sliceByteSize=0) | |
ImageView (const nkMemory::BufferView< unsigned char > dataView, unsigned int width, unsigned int height, unsigned int depth, unsigned int arraySize, unsigned int mips, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize=0) | |
ImageView (const ImageView &other) | |
ImageView (const ImageView &other, unsigned int slice) | |
ImageView (const ImageView &other, unsigned int slice, unsigned int mip) | |
ImageView (ImageView &&other) | |
~ImageView () | |
virtual unsigned char * | getDataPtr () const override |
virtual unsigned long long | getDataByteSize () const override |
virtual nkMemory::BufferView | getDataBuffer () const override |
ImageView & | operator= (const ImageView &other) |
ImageView & | operator= (ImageView &&other) |
![]() | |
ImageBase () | |
ImageBase (unsigned int width, unsigned int height, unsigned int depth, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize=0, unsigned int rowByteSize=0, unsigned int sliceByteSize=0) | |
ImageBase (unsigned int width, unsigned int height, unsigned int depth, unsigned int arraySize, unsigned int mips, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize=0) | |
ImageBase (nkMemory::BufferCast< ImageDescriptor > &&images, PIXEL_FORMAT format, unsigned int pixelOrBlockByteSize, bool alphaPremultiplied=false, bool cubeMap=false) | |
ImageBase (const ImageBase &other) | |
ImageBase (ImageBase &&other) | |
virtual | ~ImageBase () |
unsigned int | getWidth (unsigned int mip=0) const |
unsigned int | getHeight (unsigned int mip=0) const |
unsigned int | getDepthOrArraySize (unsigned int mip=0) const |
unsigned int | getMipCount () const |
PIXEL_FORMAT | getFormat () const |
unsigned int | getPixelByteSize () const |
unsigned int | getRowByteSize (unsigned int mip=0) const |
unsigned int | getSliceByteSize (unsigned int mip=0) const |
bool | getAlphaPremultiplied () const |
bool | getCubeMap () const |
bool | isArray () const |
void | setFormat (PIXEL_FORMAT value) |
void | setPixelOrBlockByteSize (unsigned int value) |
void | setAlphaPremultiplied (bool value) |
void | setCubeMap (bool value) |
nkMaths::Vector | getPixel (unsigned int x, unsigned int y, unsigned int z=0, unsigned int mip=0) |
void | setPixel (nkMaths::Vector v, unsigned int x, unsigned int y, unsigned int z=0u, unsigned int mip=0u) |
Image | decompress (const AlignmentDescriptor &alignmentDescriptor=AlignmentDescriptor()) |
ImageBase & | operator= (const ImageBase &other) |
ImageBase & | operator= (ImageBase &&other) |
Holds all information required for an image, with no ownership over the data.
See ImageBase for more information.
|
delete |
Default constructor.
nkImages::ImageView::ImageView | ( | const Image & | image | ) |
View over image constructor.
image | The image to create a view over. |
nkImages::ImageView::ImageView | ( | const nkMemory::BufferView< unsigned char > & | dataView | ) |
Data view constructor.
dataView | The view which data should be part of the image. |
nkImages::ImageView::ImageView | ( | const nkMemory::BufferView< unsigned char > | dataView, |
unsigned int | width, | ||
unsigned int | height, | ||
unsigned int | depth, | ||
PIXEL_FORMAT | format, | ||
unsigned int | pixelOrBlockByteSize = 0 , |
||
unsigned int | rowByteSize = 0 , |
||
unsigned int | sliceByteSize = 0 |
||
) |
Aligned 2D image constructor.
dataView | The view over the data which should be part of the image. |
width | The width of the image, in pixels. |
height | The height of the image, in pixels. |
depth | The depth of the image, in number of slices of width * height images. |
format | The format of the image. |
pixelOrBlockByteSize | The size of a pixel, in bytes. |
rowByteSize | The size of a row, in bytes. |
sliceByteSize | The size of a slice, in bytes. |
nkImages::ImageView::ImageView | ( | const nkMemory::BufferView< unsigned char > | dataView, |
unsigned int | width, | ||
unsigned int | height, | ||
unsigned int | depth, | ||
unsigned int | arraySize, | ||
unsigned int | mips, | ||
PIXEL_FORMAT | format, | ||
unsigned int | pixelOrBlockByteSize = 0 |
||
) |
Tightly packed full constructor. Will derive all information for slices and mips based on width, height, depth and format given / pixelOrBlockSize given. Memory will be assumed as being tightly packed (no padding inside).
dataView | The view over the data which should be part of the image. |
width | The width of the image, in pixels. |
height | The height of the image, in pixels. |
depth | The depth of the image, in number of slices of width * height images. |
arraySize | The number of slice in the image array. |
mips | The number of mips for each image slice. |
format | The pixel format of the image. |
pixelOrBlockByteSize | The size of a pixel or block, in bytes. Defaults to 0 to be automatically derived from the format. |
nkImages::ImageView::ImageView | ( | const ImageView & | other | ) |
Copy constructor. Note that no memory will be copied, only a new view over it will be created.
other | The view to copy over. |
nkImages::ImageView::ImageView | ( | const ImageView & | other, |
unsigned int | slice | ||
) |
View over array slice constructor.
other | The view to take the slice view from. |
slice | The index of the slice to take a view over. |
nkImages::ImageView::ImageView | ( | const ImageView & | other, |
unsigned int | slice, | ||
unsigned int | mip | ||
) |
View over array slice's mip constructor.
other | The view to take the slice view from. |
slice | The index of the slice to take a view over. |
mip | The mip to take a view over. |
nkImages::ImageView::ImageView | ( | ImageView && | other | ) |
Move constructor.
other | The view to move. |
nkImages::ImageView::~ImageView | ( | ) |
Destructor.
|
overridevirtual |
Implements nkImages::ImageBase.
|
overridevirtual |
Implements nkImages::ImageBase.
|
overridevirtual |
Implements nkImages::ImageBase.
Copy assignment operator.
other | The view to copy and assign. |
Move assignment operator.
other | The view to move and assign. |